package com.kaifa.test;

/**
 *计算生日 10-20
 * 计算当前时间距离下一次生日还有多少天
 */
public class WorkDemo {
    public static void main(String[] args) {
        int days=0;
        int num = 10;
        switch (num){
            case 10:
                days+=20;
            case 12:
                days+=0;
            case 1:
                days+=31;
            case 2:
                days+=28;
            case 3:
                days+=31;
            case 4:
                days+=30;
            case 5:
                days+=31;
            case 6:
                days+=30;
            case 7:
                days+=31;
            case 8:
                days+=31;
            case 9:
                days+=30;
                break;
            case 11:
                days+=30;
                break;
            default:
                days=0;
        }
        System.out.println(days);

    }
}
